package com.droid.lib.controls.demo.view;

import android.support.v4.app.Fragment;

import com.droid.lib.controls.demo.R;


/**
 * TODO 数据采集
 * Author: cuixiaohua
 * Created on: 2017-11-08 10:17
 */
public enum AllChartsFragmentEntity {
    /**
     * 待数据采集和已数据采集
     */
    UNFINISHED("图表", R.layout.basic_title_offset_auto_center);

    public final String titleResId;
    public final int layoutResId;

    /**
     * 获取所有标题
     *
     * @return
     */
    public static String[] tab11() {
        return new String[]{
                "仪表盘",
               "区域分布图",
               "玫瑰风向图","雷达表","漏斗图","平底","金字塔图","对比漏斗图","对称漏斗图"
        };
    }

    AllChartsFragmentEntity(String titleResId, int layoutResId) {
        this.titleResId = titleResId;
        this.layoutResId = layoutResId;
    }

    public String[] tabs() {
        return tab11();
    }

    /**
     * 获取所有页面
     *
     * @param index
     * @return
     */
    public Class<? extends Fragment> getClazz(int index) {
        Class<? extends Fragment> clazz = null;
        switch (index) {
            case 0:
                clazz = InstruFragment.class;
                break;
            case 1:
                clazz = ChinaSvgFragment.class;
                break;
            case 2:
                clazz = RoseChartFragment.class;
                break;
            case 3:
                clazz=RedarFragment.class;
                break;
            case 4:
                clazz=FunnelFragment.class;
                break;
            case 5:
                clazz=FlatFunnelFragment.class;
                break;
            case 6:
                clazz=PyramidFragment.class;
                break;
            case 7:
                clazz=ContrastFragment.class;
                break;
            case 8:
                clazz=SymmetryFragment.class;
                break;
            default:
                break;
        }
        return clazz;
    }

}
